package com.group11.gateway;

import com.group11.common.pojo.ResponseResult;
import com.group11.common.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("service-user")//value属性是服务名
public interface UserService {

    @PostMapping("verifyJwt")
    ResponseResult<Void> verifyJwt(@RequestParam String token);


    // 需要使用参数的注解@RequestParam表达发送的是get请求(强制性，注解为PostMapping时也会发送get请求)
    @GetMapping("parseJwt")
    ResponseResult<UserVO> parseJwt(@RequestParam String token);
}
